/* ================================== */
/* CSS for control sap.m/GenericTile  */
/* Belize theme                       */
/* ================================== */

.sapMGT.sapMGTBackgroundImage {
	.sapMGTContent {
		border-bottom-left-radius: 0.125rem;
		border-bottom-right-radius: 0.125rem;
	}
}

.sapMGT.sapMGTScopeActions.sapMGTBackgroundImage .sapMGTMoreIcon {
	color: @sapUiContentContrastTextColor;
}

/************************ LINE MODE COZY ********************/

.sapMGT.sapMGTLineMode {
	transition: background 0.2s;
	background: transparent;
}

.sap-desktop .sapMGT.sapMGTLineMode:not(.sapMGTDisabled) {
	&:not(.sapMGTLineModePress):hover {
		background: fade(@sapUiShellHoverBackground, 10);
	}
}

.sapMGT.sapMGTLineMode:not(.sapMGTDisabled).sapMGTLineModePress {
	background: fade(@sapUiShellHoverBackground, 12);
}

.sapMGT.sapMGTLineMode .sapMGTFocusDiv {
	border-radius: 0;
}

.sapMGTLineMode .sapMGTLineModeFailedIcon {
	cursor: pointer;
	color: @sapUiContentNonInteractiveIconColor;
	text-shadow: @sapUiShadowText;
}

.sapMGTLineMode.sapMGTDisabled > .sapMGTTouchArea > *:not(.sapMGTActionsContainer) {
	opacity: 0.5;
}

.sapMGTLineMode.sapMGTFailed .sapMGTLineModeFailedIcon ~ *:not(.sapMGTStyleHelper):not(.sapMGTActionsContainer):not(.sapMGTEndMarker) {
	opacity: 0.5;
}

.sapMGTLineMode .sapMGTActionsContainer .sapMGTRemoveButton {
	border: 1px solid @sapUiButtonBorderColor;
	background-color: @sapUiButtonBackground;
	color: @sapUiButtonTextColor;

	&:before {
		color: @sapUiButtonIconColor;
	}
}

.sapMGTLineMode .sapMGTLineModeHelpContainer:not(:last-child) {
	-webkit-mask-image: linear-gradient(to right, #FFF ~"calc(100% - 1.5rem)", transparent);

	html[dir~=rtl] & {
		-webkit-mask-image: linear-gradient(to left, #FFF ~"calc(100% - 1.5rem)", transparent);
	}

	.sapMGTHdrTxt, .sapMGTSubHdrTxt {
		text-overflow: clip;
	}
}

/************************ LINE MODE COMPACT *****************/

.sapUiSizeCompact {
	.sap-desktop & .sapMGT.sapMGTLineMode:not(.sapMGTDisabled) {
		&:focus, &.sapMGTLineModePress {
			.sapMGTLineStyleHelperInner:before {
				content: "";
				position: absolute;
				top: 1px;
				left: 1px;
				bottom: 1px;
				right: 1px;
				box-sizing: border-box;
				border: 1px dotted @sapUiContentFocusColor;
			}
		}

		&:hover .sapMGTLineStyleHelperInner {
			background: fade(@sapUiShellHoverBackground, 10);
		}
	}

	.sapMGT.sapMGTLineMode {
		font-size: @sapMFontMediumSize;

		& * {
			font-size: @sapMFontMediumSize;
		}

		&.sapMGTDisabled {
			.sapMGTHdrTxt, .sapMGTSubHdrTxt {
				opacity: 0.5;
			}
		}

		.sapMGTLineStyleHelper {
			&:first-child:not(:only-child) .sapMGTLineStyleHelperInner {
				margin-right: 0.125rem;
			}

			&:not(:first-child) .sapMGTLineStyleHelperInner {
				margin: 0 0.125rem;
			}
			&:last-child .sapMGTLineStyleHelperInner {
				margin-right: 0;
			}

			&:first-child .sapMGTLineStyleHelperInner {
				border-top-left-radius: 0.2rem;
				border-bottom-left-radius: 0.2rem;
			}

			&:last-child .sapMGTLineStyleHelperInner {
				border-top-right-radius: 0.2rem;
				border-bottom-right-radius: 0.2rem;
			}
		}

		.sapMGTLineStyleHelperInner {
			transition: background 0.2s;
		}

		&.sapMGTLineModePress:not(.sapMGTDisabled) {
			&, &:hover {
				.sapMGTLineStyleHelperInner {
					background: fade(@sapUiShellHoverBackground, 12);
				}
			}
		}
	}
}

/************************************************************/

.sapMGTLineMode .sapMGTHdrTxt {
	color: @sapUiShellTextColor;
	font-size: @sapMFontMediumSize;
	text-shadow: @sapUiShadowText;
}

.sapMGTLineMode .sapMGTSubHdrTxt {
	color: @sapUiTileTextColor;
	font-size: @sapMFontMediumSize;
	text-shadow: @sapUiShadowText;
}

html.sap-desktop .sapMGTWithoutImageHoverOverlay,
html.sap-desktop .sapMGTWithImageHoverOverlay {
	z-index: 1;
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	left: 0;
	bottom: 0;
	transition: background 0.2s;
}

html.sap-phone .sapMGTWithoutImageHoverOverlay,
html.sap-phone .sapMGTWithImageHoverOverlay,
html.sap-tablet .sapMGTWithoutImageHoverOverlay,
html.sap-tablet .sapMGTWithImageHoverOverlay {
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	left: 0;
	bottom: 0;
}

html.sap-desktop .sapMGTWithoutImageHoverOverlay.sapMGTPressActive,
html.sap-phone .sapMGTWithoutImageHoverOverlay.sapMGTPressActive,
html.sap-tablet .sapMGTWithoutImageHoverOverlay.sapMGTPressActive {
	background: fade(@sapUiShellActiveBackground, 8) !important;
}

html.sap-desktop .sapMGTWithImageHoverOverlay.sapMGTPressActive,
html.sap-phone .sapMGTWithImageHoverOverlay.sapMGTPressActive,
html.sap-tablet .sapMGTWithImageHoverOverlay.sapMGTPressActive {
	background: fade(@sapUiShellActiveBackground, 22) !important;
}

html.sap-desktop .sapMGT:hover .sapMGTWithoutImageHoverOverlay:not(.sapMGTWithoutImagePressActive) {
	background: fade(@sapUiShellHoverBackground, 4);
}

html.sap-desktop .sapMGT:hover .sapMGTWithImageHoverOverlay:not(.sapMGTWithImagePressActive) {
	background: fade(@sapUiShellHoverBackground, 18);
}

html.sap-desktop .sapMGT:focus .sapMGTFocusDiv,
html.sap-desktop .sapMGT:active .sapMGTFocusDiv,
html.sap-desktop .sapMGTLineModePress .sapMGTFocusDiv {
	border: 1px dotted @sapUiContentFocusColor;
}


html.sap-desktop .sapMGT.sapMGTBackgroundImage:focus .sapMGTFocusDiv,
html.sap-desktop .sapMGT.sapMGTBackgroundImage:active .sapMGTFocusDiv {
	&:after {
		content: "";
		.sapMGTOverlayMixin();
		border-radius: 0.125rem;
		margin: -1px;
		border: 1px dotted @sapUiContentContrastFocusColor;
		z-index: 0;
	}
}
